package com.zhoutao.blog.seven.model.exception;

import java.io.Serializable;

public class BaseBizException extends RuntimeException {

    private final ErrorCode errorCode;

    public BaseBizException(ErrorCode errorCode, Serializable... args) {
        super(errorCode.getDesc());
        this.errorCode = errorCode;
    }

    public int code() {
        return this.errorCode.getCode();
    }

    public String message() {
        return this.getMessage();
    }
}
